import server from '@/utils/axiosAPI'

export default {
    getCateList (){
        return server.get("categories")
    },

    getParamsData (id,cid){
        return server.get(`categories/${id}/attributes`,cid)
    },
    
    addParams (id,cid){
        return server.post(`categories/${id}/attributes`,cid)
    },

    showEditDialog (id,pid,cid){
        return server.get(`categories/${id}/attributes/${pid}`,cid)
    },

    editParams (id,cid,pid){
        return server.put(`categories/${id}/attributes/${cid}`,pid)
    },

    deletes (id,cid){
        return server.delete(`categories/${id}/attributes/${cid}`)
    },

    saveAttrVals (id,cid,pid){
        return server.put(`categories/${id}/attributes/${cid}`,pid)
    },

}